#!/bin/bash
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
INDEX_PATH="$DIR/../Resources/app/index.html"

# Run in dedicated standalone app mode without browser UI
if [ -d "/Applications/Google Chrome.app" ]; then
    open -na "Google Chrome" --args "--app=file://$INDEX_PATH" --window-size=1400,900 --no-first-run --allow-file-access-from-files
elif [ -d "/Applications/Brave Browser.app" ]; then
    open -na "Brave Browser" --args "--app=file://$INDEX_PATH" --window-size=1400,900 --no-first-run --allow-file-access-from-files
elif [ -d "/Applications/Microsoft Edge.app" ]; then
    open -na "Microsoft Edge" --args "--app=file://$INDEX_PATH" --window-size=1400,900 --no-first-run --allow-file-access-from-files
else
    open "file://$INDEX_PATH"
fi
